home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / KeyboardPlugin.p < prev    next >
Text File  |  1996-05-01  |  4KB  |  132 lines

  1. {
  2.      File:        KeyboardPlugin.p
  3.  
  4.      Contains:    Required interface for Keyboard Family-Plugins
  5.  
  6.      Version:    Technology:    
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT KeyboardPlugin;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __KEYBOARDPLUGIN__}
  28. {$SETC __KEYBOARDPLUGIN__ := 1}
  29.  
  30. {$I+}
  31. {$SETC KeyboardPluginIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __KEYBOARD__}
  38. {$I Keyboard.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __NAMEREGISTRY__}
  41. {$I NameRegistry.p}
  42. {$ENDC}
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48. {$IFC FOR_SYSTEM8_PREEMPTIVE }
  49. {
  50. ####################################################################################
  51.         Constructor/Destructor Messages
  52. ####################################################################################
  53. }
  54.  
  55. TYPE
  56.     KeyboardPluginInitPtr = ProcPtr;  { FUNCTION KeyboardPluginInitPtr(theID: KeyboardID; VAR theDeviceRecord: KeyboardDeviceRecord; (CONST)VAR theRegEntryRef: RegEntryRef): OSStatus; C; }
  57.  
  58. {  normal termination }
  59.     KeyboardPluginFreePtr = ProcPtr;  { FUNCTION KeyboardPluginFreePtr: OSStatus; C; }
  60.  
  61. {  error condition termination }
  62.     KeyboardPluginEjectPtr = ProcPtr;  { FUNCTION KeyboardPluginEjectPtr: OSStatus; C; }
  63.  
  64. {
  65. ####################################################################################
  66.         Control Messages
  67. ####################################################################################
  68. }
  69.     KeyboardPluginStartI0Ptr = ProcPtr;  { FUNCTION KeyboardPluginStartI0Ptr: OSStatus; C; }
  70.  
  71.     KeyboardPluginHaltIOPtr = ProcPtr;  { FUNCTION KeyboardPluginHaltIOPtr: OSStatus; C; }
  72.  
  73. {
  74. ####################################################################################
  75.         Functional Messages
  76. ####################################################################################
  77. }
  78.     KeyboardPluginValidateHardwarePtr = ProcPtr;  { FUNCTION KeyboardPluginValidateHardwarePtr: OSStatus; C; }
  79.  
  80.     KeyboardPluginGetModifierKeyStatePtr = ProcPtr;  { FUNCTION KeyboardPluginGetModifierKeyStatePtr(VAR modifiers: KeyboardModifiers): OSStatus; C; }
  81.  
  82.     KeyboardPluginLEDStatusPtr = ProcPtr;  { FUNCTION KeyboardPluginLEDStatusPtr(which: KeyboardLEDSelector; VAR state: KeyboardLEDState): OSStatus; C; }
  83.  
  84.     KeyboardPluginSetLEDPtr = ProcPtr;  { FUNCTION KeyboardPluginSetLEDPtr(which: KeyboardLEDSelector; state: ByteParameter): OSStatus; C; }
  85.  
  86.     KeyboardPluginGetNextKeyPtr = ProcPtr;  { FUNCTION KeyboardPluginGetNextKeyPtr(VAR next: LowLevelKeyEvent): OSStatus; C; }
  87.  
  88.     KeyboardPluginGetDeviceModePtr = ProcPtr;  { FUNCTION KeyboardPluginGetDeviceModePtr(VAR theMode: KeyboardDeviceMode): OSStatus; C; }
  89.  
  90.     KeyboardPluginSetDeviceModePtr = ProcPtr;  { FUNCTION KeyboardPluginSetDeviceModePtr(theMode: KeyboardDeviceMode): OSStatus; C; }
  91.  
  92. {
  93. ####################################################################################
  94.         Dispatch Table Definition
  95. ####################################################################################
  96. }
  97.  
  98. CONST
  99.     kKeyboardPluginDispatchTableVersion1 = $0001;
  100.     kKeyboardPluginDispatchTableCurrentVersion = $0001;
  101.  
  102.  
  103. TYPE
  104.     KeyboardPluginDispatchTablePtr = ^KeyboardPluginDispatchTable;
  105.     KeyboardPluginDispatchTable = RECORD
  106.         version:                INTEGER;
  107.         PlugInInit:                KeyboardPluginInitPtr;
  108.         PlugInFree:                KeyboardPluginFreePtr;
  109.         PlugInEject:            KeyboardPluginEjectPtr;
  110.         PlugInStartIO:            KeyboardPluginStartI0Ptr;
  111.         PlugInHaltIO:            KeyboardPluginHaltIOPtr;
  112.         PlugInValidateHardware:    KeyboardPluginValidateHardwarePtr;
  113.         PlugInGetModifierKeyState: KeyboardPluginGetModifierKeyStatePtr;
  114.         PlugInLEDStatus:        KeyboardPluginLEDStatusPtr;
  115.         PlugInSetLED:            KeyboardPluginSetLEDPtr;
  116.         PlugInGetNextKey:        KeyboardPluginGetNextKeyPtr;
  117.         PlugInGetDeviceMode:    KeyboardPluginGetDeviceModePtr;
  118.         PlugInSetDeviceMode:    KeyboardPluginSetDeviceModePtr;
  119.     END;
  120.  
  121. {$ENDC}
  122. {$ALIGN RESET}
  123. {$POP}
  124.  
  125. {$SETC UsingIncludes := KeyboardPluginIncludes}
  126.  
  127. {$ENDC} {__KEYBOARDPLUGIN__}
  128.  
  129. {$IFC NOT UsingIncludes}
  130.  END.
  131. {$ENDC}
  132.